package com.thb.pay.core.utils;

/**
 * 常量
 */
public class Constant {
    /**
     * 运营系统
     */
    public final static Integer SYSTEM_MANAGE = 1;
    /**
     * 商户系统
     */
    public final static Integer SYSTEM_MERCHANT = 2;
    /**
     * 代理商系统
     */
    public final static Integer SYSTEM_AGENT = 3;


    public static final String CHARSET = "utf-8";
    /**
     * 超级管理员ID
     */
    public static final int SUPER_ADMIN = 1;

    /**
     * ORACLE、MYSQL
     */
    public static final String USE_DATA = "MYSQL";
    /**
     * 分页条数
     */
    public static final int pageSize = 10;
    /**
     * 权限前缀
     */
    public static final String PERMS_LIST = "permsList";
    /**
     * 云存储配置KEY
     */
    public final static String CLOUD_STORAGE_CONFIG_KEY = "CLOUD_STORAGE_CONFIG_KEY";
    /**
     * 短信配置KEY
     */
    public final static String SMS_CONFIG_KEY = "SMS_CONFIG_KEY";
    /**
     * 权限前缀
     */
    public static final String SESSION_KEY = "SESSIONID_";

    /**
     * 排序方式名称 asc:正序 | desc:倒序
     */
    public static final String SORT_ORDER = "sortOrder";
    /**
     * 当前登录用户
     */
    public static final String CURRENT_USER = "curUser";
    /**
     * 默认密码
     */
    public static final String DEFAULT_PASS_WORD = "888888";

    /**
     * 未删除
     */
    public static final String DEL_FLAG_NOMAL = "0";

    /**
     * 已删除
     */
    public static final String DEL_FLAG_ABNORMAL = "1";

    public static final String MINIAPP_CONTROLLER_ROOT_PATH = "/api";
    public static final String TENANT_CONTROLLER_ROOT_PATH = "/api";
    public static final String MGR_CONTROLLER_ROOT_PATH = "/api";
    public static final String APP_CONTROLLER_ROOT_PATH = "/api";


    public final static Integer PUB_YES = 1;   // 是
    public final static Integer PUB_NO = 0;    // 否


    /**
     * 国际化请求参数 post get 参数增加 lang属性=zh_CN  en_US
     */
    public static final String LOCALE_REQUEST_PARAM_LANG = "lang";

    public static final String HEADER_LOCALE_LANGUAGE = "Accept-Language";

    public static final String HEADER_ACTIVE_LANGUAGE = "active-language";

    public static final String ACCESS_TOKEN = "accessToken:%s";

    public static final String REFRESH_TOKEN = "refreshToken:%s";

    public static final String HEADER_TOKEN = "token";

    public static final String CLAIMS = "claims";

    public static final int EXPIRE_ACCESS_TOKEN_TIME = 60 * 60 * 2;//token有效期 2个小时

    public static final int EXPIRE_REFRESH_TOKEN_TIME = 60 * 60 * 24;// refreshToken 24小时过期

    public static final String DEFAULT_PASSWORD = "123456";
    /**
     * 菜单类型
     */
    public enum MenuType {
        /**
         * 目录
         */
        CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2),

        /**
         * 应用
         */
        APPCATION(3);

        private int value;

        private MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 定时任务状态
     */
    public enum ScheduleStatus {
        /**
         * 正常
         */
        NORMAL(0),
        /**
         * 暂停
         */
        PAUSE(1);

        private int value;

        private ScheduleStatus(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 云服务商
     */
    public enum CloudService {
        /**
         * 七牛云
         */
        QINIU(1),
        /**
         * 阿里云
         */
        ALIYUN(2),
        /**
         * 腾讯云
         */
        QCLOUD(3);

        private int value;

        private CloudService(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 是否类型
     */
    public enum YESNO {
        /**
         * 是
         */
        YES("0"),
        /**
         * 否
         */
        NO("1");
        private String value;

        private YESNO(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 加密类型
     */
    public enum EncryptEnum {

        MD5("MD5"),

        AES("AES"),

        SHA("SHA");
        private String value;

        private EncryptEnum(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
}
